Hello, last week you've seen how Gleba looks, it's time to get a glimpse of what you can do there. With the idea of being a biological planet full of life, it seems reasonable to expect our engineer is about to harvest some of that. We already have ways of harvesting nature, specifically trees. On Nauvis we either just hit them with an axe enough times, or later our construction robots take care of that friendly forest devastation. These tools aren't quite up to speed to be a part of a mass-production chain in our factories, though... Both of the Nauvis methods are initiated manually so not the best for automation, and the trees don't grow back - so once an area has been harvested, you need to move your operation further.
Hello all, This week's instance of FFF is brought to you by cube, your friendly neighbor clueless network programmer. This post will be more technical than usual, so let us know if you found it interesting.
Hello, Today we once again dive head-first into the world of fluids.
Hi all, the august is almost over. So is the holiday season (check out a picture from my visit to Beskydy mountains below). It was fun, we charged our (power armor) batteries and now we are ready to take another step and push Factorio forward (looking at you multiplayer!).
Hello, the summer has hit Prague with full power. The temperatures are above 30 Celsius in the shade. Fortunately, our office is in the old stone building, so the climate here is quite comfortable even without the air-conditioning.
Alpha blending and pre-multiplied alpha From time to time there is some confusion inside the team about how sprites are blended with the background when rendering, and what kind of effects we are able to achieve by tinting the sprites. So I (Posila) have decided to write up a few paragraphs about how alpha blending works (not only in Factorio), and what it means when someone talks about pre-multiplied alpha. When the GPU is figuring out what color it should draw on a particular pixel position, it runs a blending operation on just the computed pixel color and original color in the render target. There are several common blending operation modes (additive, multiplicative, overwrite, etc.), but the most common one used in Factorio is alpha blending. It calculates the resulting color using following equation (usually the new color is called 'source' and the background color that is being overwritten is called 'destination'): You can easily see that a source with alpha 0 will be fully transparent and the one with alpha 1 will be fully opaque. In games it is common to use a pre-multiplied alpha, which means the color channels of textures are stored in memory being already pre-multiplied by the alpha channel. Alpha blending with pre-multiplied alpha uses a simplified equation: Besides a slight performance gain from the GPU not having to do bunch of multiplication all the time, this equation allow us to do some extra effects we couldn't do without pre-multiplied alpha. Factorio renders sprites as colored polygons with texture. We usually refer to the color of a polygon as the 'tint', and every pixel of a sprite is multiplied with its tint. This is useful mainly for color masks, for example the diesel locomotive has a grayscale color mask which is tinted by the color it has set. Tints should have a pre-multiplied alpha too, but they don't have to, so we can use it to lie about the colors and alpha to the GPU. For example if we use tint {r=1,g=1,b=1,a=0} we can simplify previous equation even further and we get additive blending: This is great because that means we can switch between alpha and additive blending without having to change the blending state in graphics API, which would break sprite batching and result in an increase in the CPU cost of rendering. For some effects we use a tint with alpha between 0 and 1 heavily. This makes the result appear to be a combination of additive and alpha blending. For example, fire would eventually blend into a single solid color with pure additive blending, or would not look like it is emitting light with pure alpha blending. By using tint (1, 1, 1, 0.35) on the flame sprites, the brightness of overlapping flames adds up partially, but the flames don't completely lose their details. The same trick is used for smoke. Textures with pre-multiplied alpha also produce better results in texture filtering , which is probably the main reason why they are so widely used in the videogame industry.
Hello all, originally I intended to dedicate most of the post to the technical aspect of our new Multiplayer User Authorization mechanism that I have been working on in my programming time. Then I thought, hmm it would be nice to start with some project management changes that we are looking into and experimenting with. Then I pretty much ended up making a full blog post about that =) It might give you an interesting insight into issues that we are dealing with. The Multiplayer User Authorization mechanism will definitely be described in one of the future FFFs.
Hello, We are still diligently working away at the Space Age bug reports.
Hi everyone, Two months went pass like that and I am back from south India to the winterish Prague. I had a great time full of Yoga, relaxation, new experiences and of course occasional remote work on Factorio over frustratingly bad internet connection. Now my (and whole teams) focus is clear: stabilize the multiplayer, finish the endgame content and prepare the game for Steam release.